package com.miaomiao.service.system.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.miaomiao.domain.system.Role;
import com.miaomiao.mapper.system.RoleMapper;
import com.miaomiao.service.system.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Role> getUserRoles(Long userId) {
        return roleMapper.getUserRoles(userId);
    }

    @Override
    public Long getRoleIdByRoleKeyLong(String roleKey) {
        return roleMapper.getRoleIdByRoleKeyLong(roleKey);
    }
}
